package com.woniu.command.workingProcedureCommand;

import com.woniu.command.Command;
import com.woniu.command.handler.WorkingProcedureCommandHandler;
import com.woniu.outlet.po.WorkingProcedurePo;
import com.woniu.utils.ApplicationContextHolder;

public class UpdateWorkingProcedureCommand implements Command<WorkingProcedurePo, Integer> {

    private WorkingProcedureCommandHandler handler;

    public UpdateWorkingProcedureCommand() {
        this.handler = ApplicationContextHolder.getApplicationContext()
                .getBean(WorkingProcedureCommandHandler.class);
    }

    @Override
    public Integer execute(WorkingProcedurePo workingProcedurePo) {
        return this.handler.updateWorkingProcedure(workingProcedurePo);
    }
}
